package org.loneranger.p5_attribute_fill;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AfService {

    private AfUser afUser;

    public AfService() {
        System.out.println("构造函数");
    }

    /**
     * 先进行实例化，再进行的属性填充
     *
     * @param afUser
     */
    @Autowired
    public void setAfUser(AfUser afUser) {
        this.afUser = afUser;
        System.out.println("属性填充 - set注入");
    }
}
